<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>千郡医疗</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<meta name="format-detection" content="telephone=no" />
	<link rel="stylesheet" th:href="@{/weixin/css/style.css}" />
	<link rel="stylesheet" th:href="@{/weixin/css/dropload.css}" />
	<link rel="stylesheet" th:href="@{/weixin/css/weui.min.css}" />
	<script type="text/javascript"  th:src="@{/weixin/js/adaptive.js}"></script>
	<script type="text/javascript"  th:src="@{/weixin/js/fastclick.min.js}"></script>
	<script type="text/javascript"  th:src="@{/weixin/js/zepto.min.js}"></script>
	<script type="text/javascript"  th:src="@{/weixin/js/dropload.min.js}"></script>
	<script type="text/javascript" th:src="@{/weixin/js/weui.min.js}"></script>
	<script type="text/javascript" th:src="@{/assets/js/plugins/moment/moment.js}"></script>
</head>
<body>
	<section class="recordBox wrapper">
		<div class="ktab">
			<table>
				<thead>
					<tr>
						<td>日期</td>
						<td>明细</td>
						<td>积分</td>
					</tr>
				</thead>
				<tbody id="context">
				</tbody>
			</table>
		</div>
		<a href="http://mp.weixin.qq.com/s/h_jRx_Y1lk3XX1c_0VfgAQ" class="scoreBtn">积分规则</a>
	</section>

	<!-- <section class="recordBox wrapper">
	<div class="myScore">
		<div class="tBar box-h">
			<p class="flex t">日期</p>
			<p class="flex t">明细</p>
			<p class="flex t">积分</p>
		</div>
		<ul class="scoreList">
		</ul>
	</div>
	<a href="/qianjun/weixin/customer/integrateRule" class="scoreBtn">积分规则</a>
	</section> -->
</body>
<script type="text/javascript">
/*<![CDATA[*/
$(function(){
	var page = 0;
    $('.wrapper').dropload({
	    //scrollArea : window,
	    autoLoad : true,//自动加载
	    loadDownFn : function(me){
	     window.history.pushState(null, document.title, window.location.href);
	        $.ajax({
	            type: 'GET',
	            url:'/qianjun/weixin/customer/tegrateList?page='+page,
	            dataType: 'json',
	            success: function(data){
	                if(data.content.length == 0){
	                    me.lock();
	                    me.noData();
	                    me.resetload();
	                    return;
	                }

			        var result = '';
	                for(var i=0; i< data.content.length; i++){
	                  result+=content(data.content[i]);
	                }
	                
	                $('#context').append(result);
	                page++;
	                me.resetload();
	            },
	            error: function(xhr, type){
	                alert('Ajax error!');
	                me.resetload();
	            }
	        });
	    }
	});
});

function content(data){
	return '<tr><td>'+data.integraDate+'</td><td>'+data.ruleName+'</td><td>'+data.integration+'</td></tr>';
}


/*]]>*/
</script>
</html>